<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Login page</title>
</head>
    <body>
    <?php
		session_start();
    if (isset($_POST['submit'])){
		$user = $_POST['username'];
		$pass = $_POST['password'];
		
		$_SESSION['username'] = $user;
		$_SESSION['password'] = $pass;
		if (isset($_SESSION['USER_URL']))
			$user_url = $_SESSION['USER_URL'];
		else
			$user_url = 'matrix.php';
		header("Location: $user_url");
	}
	?>
	<form method="post">
		<p>Username: <input type="text" name="username"/></p>
		<p>Login: <input type="password" name="password"/></p>
		<p><input type="submit" value="login" name="submit"/></p>
	</form>
    </body>
</html>